home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / PRGMANIA / VERSION1.5 / VDI.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-28  |  11.6 KB  |  256 lines

  1. /*************************************************************************/
  2. /*                                                                                                                         */
  3. /*    by Christophe BOYANIQUE                                                                                 */
  4. /*    for EGlib                                                                                                       */
  5. /*                                                                                                                         */
  6. /*************************************************************************/
  7.  
  8. #if  !defined( __VDI__ )
  9. #define __VDI__
  10.  
  11. /****** Control definitions **********************************************/
  12. void    v_opnwk                (int *work_in,int *handle,int *work_out);
  13. void    v_clswk                (int handle);
  14. void    v_opnvwk                (int *work_in,int *handle,int *work_out);
  15. void    v_clsvwk                (int handle);
  16. void    v_clrwk                (int handle);
  17. void    v_updwk                (int handle);
  18. int    vst_load_fonts        (int handle,int select);
  19. void    vst_unload_fonts    (int handle,int select);
  20. void    vs_clip                (int handle,int clip_flag,int *pxyarray);
  21.  
  22. /****** Output definitions ***********************************************/
  23. void    v_pline            (int handle,int count,int *pxyarray);
  24. void    v_pmarker        (int handle,int count,int *pxyarray);
  25. void    v_gtext            (int handle,int x,int y,char *string);
  26. void    v_fillarea        (int handle,int count,int *pxyarray);
  27. void    v_cellarray        (int handle,int *pxyarray,int row_length,int el_used,
  28.                             int num_rows,int wrt_mode,int *colarray);
  29. void    v_contourfill    (int handle,int x,int y,int index);
  30. void    vr_recfl            (int handle,int *pxyarray);
  31. void    v_bar                (int handle,int *pxyarray);
  32. void    v_arc                (int handle,int x,int y,int radius,int begang,int endang);
  33. void    v_pieslice        (int handle,int x,int y,int radius,int begang,int endang);
  34. void    v_circle            (int handle,int x,int y,int radius);
  35. void    v_ellarc            (int handle,int x,int y,int xradius,int yradius,
  36.                             int begang,int endang);
  37. void    v_ellpie            (int handle,int x,int y,int xradius,int yradius,
  38.                             int begang,int endang);
  39. void    v_ellipse        (int handle,int x,int y,int xradius,int yradius);
  40. void    v_rbox              (int handle,int *pxyarray);
  41. void    v_rfbox             (int handle,int *pxyarray);
  42. void    v_justified        (int handle,int x,int y,char *string,int length,
  43.                             int word_space,int char_space);
  44.  
  45. /****** Attribute definitions ********************************************/
  46. int    vswr_mode        (int handle,int mode);
  47. void    vs_color            (int handle,int index,int *rgb_in);
  48. int    vsl_type            (int handle,int style);
  49. void    vsl_udsty        (int handle,int pattern);
  50. int    vsl_width        (int handle,int width);
  51. int    vsl_color        (int handle,int color_index);
  52. void    vsl_ends            (int handle,int beg_style,int end_style);
  53. int    vsm_type            (int handle,int symbol);
  54. int    vsm_height        (int handle,int height);
  55. int    vsm_color        (int handle,int color_index);
  56. void    vst_height        (int handle,int height,int *char_width,int *char_height,
  57.                             int *cell_width,int *cell_height);
  58. int    vst_point        (int handle,int point,int *char_width,int *char_height,
  59.                             int *cell_width,int *cell_height );
  60. int    vst_rotation    (int handle,int angle);
  61. int    vst_font            (int handle,int font);
  62. int    vst_color        (int handle,int color_index);
  63. int    vst_effects        (int handle,int effect);
  64. void    vst_alignment    (int handle,int hor_in,int vert_in,int *hor_out,int *vert_out);
  65. int    vsf_interior    (int handle,int style);
  66. int    vsf_style        (int handle,int style_index);
  67. int    vsf_color        (int handle,int color_index);
  68. int    vsf_perimeter    (int handle,int per_vis);
  69. void    vsf_udpat        (int handle,int *pfill_pat,int planes);
  70.  
  71. /****** Raster definitions ***********************************************/
  72. void    vro_cpyfm    (int handle,int vr_mode,int *pxyarray,MFDB *psrcMFDB,
  73.                         MFDB *pdesMFDB);
  74. void    vrt_cpyfm    (int handle,int vr_mode,int *pxyarray,MFDB *psrcMFDB,
  75.                         MFDB *pdesMFDB,int *color_index);
  76. void    vr_trnfm        (int handle, MFDB *psrcMFDB, MFDB *pdesMFDB);
  77. void    v_get_pixel    (int handle,int x,int y,int *pel,int *index);
  78.  
  79. /****** Input definitions ************************************************/
  80. void    vsin_mode    (int handle,int dev_type,int mode);
  81. void    vrq_locator    (int handle,int x,int y,int *xout,int *yout,int *term);
  82. int    vsm_locator    (int handle,int x,int y,int *xout,int *yout,int *term);
  83. void    vrq_valuator(int handle,int valuator_in,int *valuator_out,int *terminator);
  84. void    vsm_valuator(int handle,int val_in,int *val_out,int *term,int *status);
  85. void    vrq_choice    (int handle,int ch_in,int *ch_out);
  86. int    vsm_choice    (int handle,int *choice);
  87. void    vrq_string    (int handle,int max_length,int echo_mode,int *echo_xy,char *string);
  88. int    vsm_string    (int handle,int max_length,int echo_mode,int *echo_xy,char *string);
  89. void    vsc_form        (int handle,int *pcur_form);
  90. void    vex_timv        (int handle,int (*tim_addr)(),int (**otim_addr)(),int *tim_conv);
  91. void    v_show_c        (int handle,int reset);
  92. void    v_hide_c        (int handle);
  93. void    vq_mouse        (int handle,int *pstatus,int *x,int *y);
  94. void    vex_butv        (int handle,int (*pusrcode)(),int (**psavcode)());
  95. void    vex_motv        (int handle,int (*pusrcode)(),int (**psavcode)());
  96. void    vex_curv        (int handle,int (*pusrcode)(),int (**psavcode)());
  97. void    vq_key_s        (int handle,int *pstatus);
  98.  
  99. /****** Inquire definitions **********************************************/
  100. void    vq_extnd            (int handle,int owflag,int *work_out);
  101. int    vq_color            (int handle,int color_index,int set_flag,int *rgb);
  102. void    vql_attributes    (int handle,int *attrib);
  103. void    vqm_attributes    (int handle,int *attrib);
  104. void    vqf_attributes    (int handle,int *attrib);
  105. void    vqt_attributes    (int handle,int *attrib);
  106. void    vqt_extent        (int handle,char *string,int *extent);
  107. int    vqt_width        (int handle,char character,int *cell_width,int *left_delta,
  108.                             int *right_delta);
  109. /*int    vqt_name            (int handle,int element_num,char *name);*/
  110. void    vq_cellarray    (int handle,int *pxyarray,int row_length,int num_rows,
  111.                             int *el_used,int *rows_used,int *status,int *colarray);
  112. void    vqin_mode        (int handle,int dew_type,int *input_mode);
  113. void    vqt_fontinfo    (int handle,int *minADE,int *maxADE,int *distances,
  114.                             int *maxwidth,int *effects);
  115.  
  116. /****** Escape definitions ***********************************************/
  117. void    vq_chcells            (int handle,int *rows,int *columns);
  118. void    v_exit_cur            (int handle);
  119. void    v_enter_cur            (int handle);
  120. void    v_curup                (int handle);
  121. void    v_curdown            (int handle);
  122. void    v_curright            (int handle);
  123. void    v_curleft            (int handle);
  124. void    v_curhome            (int handle);
  125. void    v_eeos                (int handle);
  126. void    v_eeol                (int handle);
  127. void    vs_curaddress        (int handle,int row,int column);
  128. void    v_curaddress        (int handle,int row,int column);
  129. void    v_curtext            (int handle,char *string);
  130. void    v_rvon                (int handle);
  131. void    v_rvoff                (int handle);
  132. void    vq_curaddress        (int handle,int *row,int *column);
  133. int    vq_tabstatus        (int handle);
  134. void    v_hardcopy            (int handle);
  135. void    v_dspcur                (int handle,int x,int y);
  136. void    v_rmcur                (int handle);
  137. void    v_form_adv            (int handle);
  138. void    v_output_window    (int handle,int *xyarray);
  139. void    v_clear_disp_list    (int handle);
  140. void    v_bit_image            (int handle,const char *filename,int aspect, int x_scale,
  141.                                 int y_scale,int h_align,int v_align,int *xyarray);
  142. void    vq_scan                (int handle,int *g_slice,int *g_page,int *a_slice,
  143.                                 int *a_page,int *div_fac);
  144. void    v_alpha_text        (int handle,char *string);
  145. void    vs_palette            (int handle,int palette);
  146. void    v_sound                (int handle,int frequency,int duration);
  147. int    vs_mute                (int handle,int action);
  148. void    vqp_films            (int handle,char *film_names);
  149. void    vqp_state            (int handle,int *port, char *film_name,int *lightness,
  150.                                 int *interlace,int *planes,int *indexes);
  151. void    vsp_state            (int handle,int port,int film_num,int lightness,
  152.                                 int interlace,int planes,int *indexes);
  153. void    vsp_save                (int handle);
  154. void    vsp_message            (int handle);
  155. int    vqp_error            (int handle);
  156. void    v_meta_extents        (int handle,int min_x,int min_y,int max_x,int max_y);
  157. void    v_write_meta        (int handle,int num_intin,int *intin,int num_ptsin,int *ptsin);
  158. void    vm_coords            (int handle,int llx,int lly,int urx,int ury);
  159. void    vm_filename            (int handle,const char *filename);
  160. void    vm_pagesize            (int handle,int pgwidth,int pdheight);
  161. void    v_offset                (int handle,int offset);
  162. void    v_fontinit            (int handle,int fh_high,int fh_low);
  163. void    v_escape2000        (int handle,int times);
  164. void    vt_resolution        (int handle,int xres,int yres,int *xset,int *yset);
  165. void    vt_axis                (int handle,int xres,int yres,int *xset,int *yset);
  166. void    vt_origin            (int handle,int xorigin,int yorigin);
  167. void    vq_tdimensions        (int handle,int *xdimension,int *ydimension);
  168. void    vt_alignment        (int handle,int dx,int dy);
  169. void    vsp_film                (int handle,int index,int lightness);
  170. void    vsc_expose            (int handle,int state);
  171.  
  172. #define    GDOS_NONE    -2L                /*    no GDOS installed                    */
  173. #define    GDOS_FSM        0x5F46534DL        /*    '_FSM' - FSMGDOS installed        */
  174. #define    GDOS_FNT        0x5F464E54L        /*    '_FNT' - FONTGDOS installed    */
  175. #define    GDOS_SPD        0x5F535044L        /*    '_SPD' - SPEEDOGDOS installed    */
  176.  
  177. /*int    vq_gdos                (void);
  178. long    vq_vgdos            (void);*/
  179.  
  180. int    v_bez_on                (int handle);
  181. void    v_bez_off            (int handle);
  182. void    v_set_app_buff        (int handle,int **address,int nparagraphs);
  183. void    v_bez                    (int handle,int count,int *xyarr,char *bezarr,
  184.                                 int *extent,int *totpts,int *totmoves);
  185. void    v_bez_fill            (int handle,int count,int *xyarr,char *bezarr,
  186.                                 int *extent,int *totpts,int *totmoves);
  187. int    v_bez_qual            (int handle,int prcnt,int *actual);
  188.  
  189. /****** FSMGDOS definitions **********************************************/
  190. typedef struct
  191. {
  192.     int    value;
  193.     int    remainder;
  194. }    fsm_int;
  195.  
  196. typedef struct
  197. {
  198.     fsm_int    x;
  199.     fsm_int    y;
  200. }    fsm_fpoint_t;
  201.  
  202. typedef struct
  203. {
  204.     fsm_fpoint_t    pt;
  205.     fsm_fpoint_t    cpt;
  206.     fsm_int            sharp;
  207. }    fsm_data_fpoint_t;
  208.  
  209. typedef struct fsm_component_t
  210. {
  211.     int                            resevered1;
  212.     struct fsm_component_t    *nextComponent;
  213.     unsigned char                numPoints;
  214.     unsigned char                numCurves;
  215.     unsigned char                numContours;
  216.     unsigned char                reserved2[13];
  217.     fsm_data_fpoint_t            *points;
  218.     unsigned char                *startPts;
  219. }    fsm_component_t;
  220.  
  221. void    vqt_f_extent    (int handle,char *string,int *extent);
  222. void    v_ftext            (int handle,int x,int y,char *string);
  223. void    v_killoutline    (int handle,fsm_component_t *component);
  224. void    v_getoutline    (int handle,int ch,fsm_component_t **component);
  225. void    vst_scratch        (int handle,int mode);
  226. void    vst_error        (int handle,int mode,int *errorvar);
  227. void    vqt_advance        (int handle,int ch,int *advx,int *advy,int *remx,int *remy);
  228. int vst_arbpt(int handle, int point, int *wchar, int *hchar, int *wcell, int *hcell);
  229. /*int    vst_arbpt        (int handle,int point,int *chwd,int *chht,
  230.                             int *cellwd,int *cellht);*/
  231. void    vqt_devinfo        (int handle,int devnum,int *devexits,char *devstr);
  232. int    v_flushcache    (int handle);
  233. void    vqt_cachesize    (int handle,int which_cache,long *size);
  234. void    vqt_get_tables    (int handle,int **gascii,int **sytle);
  235. int    v_loadcache        (int handle,char *filename,int mode);
  236. int    v_savecache        (int handle,char *filename);
  237. int    vst_setsize        (int handle,int point,int *chwd,int *chht,
  238.                             int *cellwd,int *cellht);
  239. int    vst_skew            (int handle,int skew);
  240.  
  241. /****** New Definitions **************************************************/
  242. void    vqt_fontheader        (int handle,char buffer[421],char *pathname);
  243. void    vqt_trackkern        (int handle,long *x,long *y);
  244. void    vqt_pairkern        (int handle,int ch1,int ch2,long *x,long *y);
  245. void    vst_charmap            (int handle,int mode);
  246. void    vst_kern                (int handle,int tmode,int pmode,int *tracks,int *pairs);
  247. void    v_getbitmap_info    (int handle,int ch,long *advancex,long *advancey,long *xoffset,
  248.                                 long *yoffset, int *width,int *height,int **bitmap);
  249. void    v_ftext_offset        (int handle,int x,int y,char *string,int *offset);
  250. void    vqt_advance32        (int handle,int ch,long *advx,long *advy);
  251. long    vst_Setsize            (int handle,long point,int *chwd,int *chht,int *cellwd,int *cellht);
  252. void    vqt_get_table        (int handle,long *map);
  253.  
  254. #endif
  255. /*************************************************************************/
  256.